#include <iostream>
#include <string>
#include <cmath>

using namespace std;

int main()
{
    int n;
    cin >> n;
    string s;
    int t = n;
    long long ans = 1;
    while (t >>= 1)
    {
        ans *= 2; 
    }
    cout << ans;
    return 0;
}
